home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
u_man
/
cat3
/
Tk
/
tk_main.z
/
tk_main
Wrap
Text File
|
1998-10-30
|
3KB
|
67 lines
TTTTkkkk____MMMMaaaaiiiinnnn((((3333TTTTkkkk)))) TTTTkkkk____MMMMaaaaiiiinnnn((((3333TTTTkkkk))))
NNNNAAAAMMMMEEEE
Tk_Main - main program for Tk-based applications
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>
TTTTkkkk____MMMMaaaaiiiinnnn(_a_r_g_c, _a_r_g_v, _a_p_p_I_n_i_t_P_r_o_c)
AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
int _a_r_g_c (in) Number of elements in _a_r_g_v.
char *_a_r_g_v[] (in) Array of strings containing
command-line arguments.
Tcl_AppInitProc *_a_p_p_I_n_i_t_P_r_o_c (in) Address of an application-
specific initialization
procedure. The value for this
argument is usually
TTTTccccllll____AAAAppppppppIIIInnnniiiitttt.
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
TTTTkkkk____MMMMaaaaiiiinnnn acts as the main program for most Tk-based applications.
Starting with Tk 4.0 it is not called mmmmaaaaiiiinnnn anymore because it is part of
the Tk library and having a function mmmmaaaaiiiinnnn in a library (particularly a
shared library) causes problems on many systems. Having mmmmaaaaiiiinnnn in the Tk
library would also make it hard to use Tk in C++ programs, since C++
programs must have special C++ mmmmaaaaiiiinnnn functions.
Normally each application contains a small mmmmaaaaiiiinnnn function that does
nothing but invoke TTTTkkkk____MMMMaaaaiiiinnnn. TTTTkkkk____MMMMaaaaiiiinnnn then does all the work of creating
and running a wwwwiiiisssshhhh-like application.
When it is has finished its own initialization, but before it processes
commands, TTTTkkkk____MMMMaaaaiiiinnnn calls the procedure given by the _a_p_p_I_n_i_t_P_r_o_c argument.
This procedure provides a ``hook'' for the application to perform its own
initialization, such as defining application-specific commands. The
procedure must have an interface that matches the type TTTTccccllll____AAAAppppppppIIIInnnniiiittttPPPPrrrroooocccc:
typedef int Tcl_AppInitProc(Tcl_Interp *_i_n_t_e_r_p);
_A_p_p_I_n_i_t_P_r_o_c is almost always a pointer to TTTTccccllll____AAAAppppppppIIIInnnniiiitttt; for more details
on this procedure, see the documentation for TTTTccccllll____AAAAppppppppIIIInnnniiiitttt.
KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
application-specific initialization, command-line arguments, main program
PPPPaaaaggggeeee 1111